<%@ include file="/WEB-INF/views/keter/global.jsp"%>
<!-- 上传页面需要 -->
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ page import="org.apache.commons.lang3.StringEscapeUtils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%
    String updateMessage = (String)request.getParameter("updateMessage");
    //必须对消息进行无害化处理 
    updateMessage=StringEscapeUtils.escapeHtml4(updateMessage);
	if(updateMessage==null || updateMessage.equals("null")){
		updateMessage = "";
	}
	%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>文件上传</title>
</head>

<div>文件上传</div>
        <form:form modelAttribute="uploadItem"  class="form-horizontal" 
        action="${reqRoot}/upload" name="frm" method="post" enctype="multipart/form-data">
        <div class="form-group">
			<label class="col-md-2 control-label" for="image">附件上传</label>
			<div class="col-md-10">
				<div class="mb5"><form:input path="data" id="image" type="file" /></div>
				<div>允许上传的文件格式：${ext}，体积不超过：${size}</div>
			</div>
			          消息：<%=updateMessage%>
		</div>
		<div class="form-group tc">
						<button type="submit" class="btn btn-success mr20" id="submit">保存</button>
					</div>
		</form:form>
		
		<a href="${reqRoot}/download/a1bdfac1-e7c9-49d1-a4a8-050a3f55d9a8">文件下载</a>